package com.performanceManagement.dao;

import com.performanceManagement.pojo.EmployeeInformation;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface EmployeeInformationDao extends JpaRepository<EmployeeInformation,Integer> {


    /**
     * 通过部门名称查询员工信息
     * @param eDepartment
     * @return
     */
    @Query(value = "from EmployeeInformation where eDepartment =?1")
    List<EmployeeInformation> findByEDepartment(String eDepartment);

    /**
     * 通过eName查询
     * @param eName
     * @return
     */
    @Query(value = "from EmployeeInformation where eName =?1")
    List<EmployeeInformation> findByEName(String eName);
}
